﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using System.IO;
using RoboTrocity;

namespace RoboTrocity {
	static class MapEditor {
		static GameObject currentObject;

		public static GameObject findSelectedObject(Map gameMap, Point mousePos) {
			foreach (GameObject gObject in gameMap.ObjectList.ObjectArray) {
				if (CollisionHandler.PointAndSquareIntersects(mousePos, gObject.Bounds)) {
					return gObject;
				}
			}
			return null;
		}

		public static GameObject CurrentObject {
			get { return currentObject; }
		}
	}
}
